#ifndef MY_PROCESS_H
#define MY_PROCESS_H 1


#define MSGD_MAX_PROCESS_NUM 1024

typedef void (*msgd_worker_process_cycle_pt)(void *data);

typedef struct {
  pid_t        pid;
  msgd_int_t   status;
  int          channel[2];
} msgd_process_t;


msgd_int_t msgd_init_process_environ();

void msgd_start_worker_processes();

void msgd_spawn_process(msgd_worker_process_cycle_pt handler,void *data,char *name);

void msgd_process_events_and_timers();

#endif //MY_PROCESS_H
